import request from '@/api/request'

function productList(data) {
    return request({
        url: '/api/leju/admin/product/list',
        method: 'get',
        data
    })
}

function switchCode(data) {
    return request({
        url: '/api/leju/admin/product/switchCode',
        method: 'post',
        data
    })

}

function productDel(data) {
    return request({
        url: '/api/leju/admin/product/delete',
        method: 'get',
        data
    })

}

function saveOrUpdate(data) {
    return request({
        url: '/api/leju/admin/product/saveOrUpdate',
        method: 'post',
        data
    })
}

function productDetail(data) {
    return request({
        url: '/api/leju/admin/product/detail',
        method: 'get',
        data
    })
}

export default {
    productList,
    switchCode,
    productDel,
    saveOrUpdate,
    productDetail
}